import request from '@/utils/request'
export function getStatic(obj) {
	return request({
		url: "/consignSaleProp/getMemberConsignSalePropList?curPage=" +
			obj.curPage +
			"&curPageSize=" +
			obj.curPageSize +
			"&priceOrder=" +
			obj.priceOrder +
			"&numOrder=" +
			obj.numOrder +
			"&type=0",
		// headers: {
		// 	isToken: true,
		// },
		'method': 'get',
	})
}
export function getTimesBuy(obj) { //时之沙购买数量
	return request({
		url: "/consignSaleProp/atOnceBuyProp?buyNumber=" +
			obj.value +
			"&id=" +
			obj.id,
		headers: {
			isToken: true,
		},
		'method': 'get',
	})
}
export function getOrderDetail(orderid) { //获取时之沙订单详情
	return request({
		url: "/consignSaleProp/getOrderDetail?id=" +
			orderid,
		headers: {
			isToken: true,
		},
		'method': 'get',
	})
}
export function goPay(obj) { //时之沙支付
	// obj.retUrl = obj.retUrl + "PropsOrderSuceeess?orderId="
	return request({
		url: "/consignSaleProp/immediatePay?id=" + obj.id + "&retUrl=" + obj.retUrl,
		// obj,
		headers: {
			isToken: true,
		},
		'method': 'post',
	})
}
export function cancelOrder(orderid) { //取消时之沙订单
	return request({
		url: "/consignSaleProp/cancelOrder?id=" + orderid,
		headers: {
			isToken: true,
		},
		'method': 'get',
	})
}
export function getOrderDetailSucceess(obj) { //时之沙订单是否支付成功
	return request({
		url: "/huiPayManager/auth/qry008?orderId=" +
			obj.orderId +
			"&orderSource=" +
			obj.orderSource,
		'method': 'get',
	})
}
export function getMonList(obj) { //市场Mon
	return request({
		url: "/tMarket/getMonList",
		data: obj,
		headers: {
			isToken: true,
		},
		'method': 'post',
	})
}
export function getCollection(id) { //获取Mon详情
	return request({
		url: "/tMarket/auth/getDetail/" + id,
		headers: {
			isToken: true,
		},
		'method': 'get',
	})
}
export function goMonPay(id) { //市场Mon
	return request({
		url: "/tMarket/createOrder/" + id,
		headers: {
			isToken: true,
		},
		'method': 'post',
	})
}
export function monOrderDetail(id) { //获取市场Mon订单详情
	return request({
		url: "/tMarket/getOrderDetail/" + id,
		headers: {
			isToken: true,
		},
		'method': 'get',
	})
}

export function monOrderPay(id, retUrl) { //萌宝支付
	// obj.retUrl = obj.retUrl + "PropsOrderSuceeess?orderId="
	return request({
		url: "/tMarket/payment/" + id + "?retUrl=" + retUrl + "&orderSource=" + 2,
		headers: {
			isToken: true,
		}, 
		'method': 'post',
	})
}
// export function monOrderPay(id,retUrl) { //萌宝支付成功页面
// 	// obj.retUrl = obj.retUrl + "PropsOrderSuceeess?orderId="
// 	return request({
// 		url: "/tMarket/payment/"+id+"?retUrl="+retUrl,
// 		headers: {
// 			isToken: true,
// 		},
// 		'method': 'post',
// 	})
// }
export function cancelMonOrder(orderid) { //取消萌宝订单
	return request({
		url: "/tMarket/cancelOrder/" + orderid,
		headers: {
			isToken: true,
		},
		'method': 'get',
	})
}
//父母种族家谱
export function getBreedTree(data) {
	return request({
		url: '/appBabymon/auth/getBreedTree/' + data,
		method: 'get',
	})
}
//场馆mon
export function getmonDetail(data, isParents) {
	return request({
		url: '/tibetanMuseum/getDetail/' + data + "?isParents=" + isParents,
		method: 'post',
	})
}
//mon折线图,//用户数量折线图
export function getMonLine() {
	return request({
		url: '/tMarket/auth/getMarketStatistics',
		method: 'get',
	})
}
//道具时之沙折线图
export function getTimesLine() {
	return request({
		url: '/consignSaleProp/auth/getTimeSandStatistics/',
		method: 'get',
	})
}
export function getMonEgg(obj) { //获取MON蛋
	return request({
		url: `/tibetanMuseum/pagingQuery/${obj.page}/${obj.num}?isHunting=1&mature=0`,
		method: 'post',
	})
}
export function getMonRecently() { //获取MON近期购买
	return request({
		url: `/tMarket/auth/getRecentlyBuy`,
		method: 'post',

	})
}

// 时之沙近期购买
export function getRecentTimeSandsRecord() {
	return request({
		url: '/consignSaleProp/auth/getRecent10TimeSandsRecord',
		method: 'get',
	})
}
//获取时之沙的价格统计数据 带成交量
export function getTimesStat() {
	return request({
		url: '/consignSaleProp/auth/getTimeSandStatisticsV2',
		method: 'get',
	})
}
// 获取mon市值
export function getMonStat() {
	return request({
		url: '/tMarket/auth/getBbmonMarketCap',
		method: 'get',
	})
}

// 获取mon部件
export function getMonPart(data) {
	return request({
		url: '/appBabymon/auth/getBabyMonPartDetail/' + data.petId,
		method: 'get',
	})
}
// 获取时之沙总量
export function getSendTimesCount() {
	return request({
		url: '/tMarket/auth/getSendTimesCount',
		method: 'get',
	})
}
// 系统时间
export function getSystemTime() {
	return request({
		url: '/tMarket/auth/getSystemTime',
		method: 'get',
	})
}

// 基因信息
export function getDna2(data) {
	return request({
		url: '/appBabymon/auth/getDna2/' + data.petId,
		method: 'get',
	})
}